package com.base.cn.platform.os.service.manage.user.member;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 *  会员记录规则接口
 *
 * @author ll
 * @create 2018-05-08
 */
@FeignClient(value = BaseService.appName,configuration = FeignAuthConfig.class)
public interface CusUserMemberService extends BaseService {

    /**
     * 添加修改用户会员
     * @param userMember
     * @return
     */
    @RequestMapping( contextPath + "/user/saveUpdateUserMember")
    Map<String,Object> saveUpdateUserMember(@RequestBody Map<String, Object> userMember);

    /**
     * ajax  搜索列表

     * @return
     */
    @RequestMapping(contextPath + "/user/queryUserMemberListPage")
    Map<String,Object> queryUserMemberListPage(@RequestParam("currentPage") Integer currentPage);


    /**
     * 根据Id搜索
     * @return
     */
    @RequestMapping(contextPath + "/user/queryUserMemberById")
    Map<String,Object> queryUserMemberById(@RequestParam("id") BigDecimal id);

    /**
     * 通过ID串查询会员商品列表并转Map
     * @param ids 会员商品列表
     * @return  Map<BigDecimal,CusUserMember>
     */
    @RequestMapping(contextPath + "/user/findUserMemberToMapByIds")
    Map<BigDecimal,Map<String,Object>> findUserMemberToMapByIds(String ids);

    /**
     * 通过ID串，查询会员商品列表
     * @param ids 会员商品ID串
     * @return List<CusUserMember>
     */
    @RequestMapping(contextPath + "/user/findUserMemberByIds")
    List<Map<String,Object>> findUserMemberByIds(@RequestParam("ids") String ids);

    /**
     * 修改状态
     * @param id
     * @param status
     * @return
     */
     @RequestMapping(contextPath + "/user/updateUserMemberStatus")
     Map<String,Object> updateUserMemberStatus(@RequestParam("id") BigDecimal id,
                                               @RequestParam("status") Integer status);

    /**
     * 查询列表
     * @param userMember
     * @return
     */
    @RequestMapping(contextPath + "/user/queryUserMemberList")
    List<Map<String,Object>> queryUserMemberList(@RequestBody Map<String, Object> userMember);
}
